
#include "../luaVector.h"
#include <complex>
#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

namespace std{

	vector<int> add(std::vector<int>* a, int b)
	{
		vector<int> res( a->size() );
		for( int ii=0; ii < res.size(); ii++)
		{
			res[ii] = (*a)[ii] + b ;
		}
		return res;
	}
	std::vector<int> sub(std::vector<int>* a, int b)
	{
		std::vector<int> res( a->size() );
		for( int ii=0; ii < res.size(); ii++)
		{
			res[ii] = (*a)[ii] - b ;
		}
		return res;
	}
	std::vector<int> mul(std::vector<int>* a, int b)
	{
		std::vector<int> res( a->size() );
		for( int ii=0; ii < res.size(); ii++)
		{
			res[ii] = (*a)[ii] * b ;
		}
		return res;
	}
	std::vector<int> div(std::vector<int>* a, int b)
	{
		std::vector<int> res( a->size() );
		for( int ii=0; ii < res.size(); ii++)
		{
			res[ii] = (*a)[ii] / b ;
		}
		return res;
	}

}


//template LUA_CPP_STD_EXPORT_API double std::min<double>( const  std::vector<double>& );
//template LUA_CPP_STD_EXPORT_API double std::max<double>( const  std::vector<double>& );


//template LUA_CPP_STD_EXPORT_API std::complex<double> std::min<std::complex<double>>( const  std::vector<std::complex<double>>& );
//template LUA_CPP_STD_EXPORT_API std::complex<double> std::max<std::complex<double>>( const  std::vector<std::complex<double>>& );
